<?php echo $this->Html->script("user_globel"); ?>
<div id="content">
  	<!--  start page-heading -->
  	<div id="page-heading">
  		<h1><?php echo __('Change Status of Ticket'); ?></h1>
  	</div>
  	<?php echo $this->Session->flash(); ?>
	<!-- end page-heading -->

  	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
      	<tr>
      		<th rowspan="3" class="sized">
              <?php echo $this->Html->image('/images/shared/side_shadowleft.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
          </th>
      		<th class="topleft"></th>
      		<td id="tbl-border-top">&nbsp;</td>
      		<th class="topright"></th>
      		<th rowspan="3" class="sized">
              <?php echo $this->Html->image('/images/shared/side_shadowright.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
          </th>
      	</tr>
      	<tr>
      		<td id="tbl-border-left"></td>
      		<td>
		<!--  start content-table-inner ...................................................................... START -->
          		<div id="content-table-inner">
          		
          			<!--  start table-content  -->
          			<div id="table-content">

<?php $options = array(
                      'Open' => 'Open',
                      'Re-opened' => 'Re-opened',
                      'Pending Payment' => 'Pending Payment',
                      'Needs Analysis' => 'Needs Analysis',
                      'Pending verification' => 'Pending verification', 
                      'SAAF Pending' => 'SAAF Pending',
                      'SAAF Approved' => 'SAAF Approved',
                      'Training Scheduled' => 'Training Scheduled', 
                      'On Hold' => 'On Hold', 
                      'Closed' => 'Closed'
                      ); 
?>
                  <?php echo $this->Form->create('Ticket', array('url' => array('controller' => 'tickets', 'action' => 'change_status'), 'class' => 'form', 'onsubmit' => 'return validateFor()')); ?>
                  <?php 
                       echo $this->Form->input('id', array('type' => 'hidden')); 
                       echo $this->Form->input('previous', array('type' => 'hidden'));
                  ?>      
    		            <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
                    		<tr>
                    			 <th valign="top">Status:</th>
                    			 <td>
                              <?php 
                                   echo $this->Form->input('status', array('label' => false, 'div' => false, 'options' => $options, 'id' => 'change_status', 'class' => 'chosen med'));     
                              ?>      
                           </td>
                    			 <td></td>
                    		</tr>
              
                      	<tr id="reason">
                      		 <th valign="top">Reason:</th>
                      		 <td>
                              <?php 
                                   echo $this->Form->input('TicketReason.reason', array('label' => false, 'div' => false, 'type' => 'textarea', 'div' => array('id' => 'reasonBox')));
                              ?>      
                          </td>
                    			<td></td>
                    		</tr>
            
                        <tr>
                        	<th>&nbsp;</th>
                        	<td valign="top">
                                <?php echo $this->Form->submit('Submit', array('label' => false, 'div' => false, 'class' => 'submit-button')); ?>
                         		    <a href="#" onclick="history.back(-1)" class="cancel-button">Cancel</a>
                          </td>
                        	<td></td>
                        </tr>
                    </table>
                <?php echo $this->Form->end(); ?>
			

<style>
#reason{
    display: none;
}
</style>

